package com.ai.mapper.made;

import com.ai.entity.BasePage;
import com.ai.entity.cameraFunctions.CameraFlowCollectionPlatformPage;
import com.ai.entity.made.CameraFlowCollectionPlatform;
import com.ai.model.vo.CameraFlowCollectionPlatformVo;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author jiaok
 * @since 2024-08-27
 */
@Mapper
public interface CameraFlowCollectionPlatformMapper extends BaseMapper<CameraFlowCollectionPlatform> {


    @Select(" SELECT\n" +
            "            cfcp.id,\n" +
            "            cfcp.platform_name,\n" +
            "            cfcp.host,\n" +
            "            cfcp.port,\n" +
            "            cfcp.app_Key,\n" +
            "            cfcp.app_secret,\n" +
            "            cfcp.region_base_id,\n" +
            "            cfcp.create_time,\n" +
            "            cfcp.create_user,\n" +
            "            cfcp.update_time,\n" +
            "            cfcp.update_user,\n" +
            "            rb.region_name\n" +
            "        FROM\n" +
            "            camera_flow_collection_platform cfcp\n" +
            "                LEFT JOIN\n" +
            "            region_base rb ON rb.id = cfcp.region_base_id\n" +
            "            ${queryWrapper.customSqlSegment}")
    BasePage<CameraFlowCollectionPlatformVo> selectPageList(@Param("platformPage") CameraFlowCollectionPlatformPage platformPage, @Param("queryWrapper") QueryWrapper<CameraFlowCollectionPlatform> queryWrapper);

}
